/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Patterns;

import java.util.logging.Logger;

/**
 *
 * @author palugs
 */
public class SymmetrixComponent implements ISymmetrixComponent 
{
    public Logger l = null;
    
    public boolean configured = false, 
            connected = false,
            active = false, 
            healthy = true; 
    
    public SymmetrixComponent(Class<?> type)
    {
        l = Logger.getLogger(type.getCanonicalName());
    }
    
    @Override
    public void configure() {
        throw new UnsupportedOperationException("Must override in deriving class.");
    }

    @Override
    public boolean ping() {
        return true;
    }

    @Override
    public void reboot() {
        throw new UnsupportedOperationException("Must override in deriving class.");
    }

    @Override
    public boolean isConnected() {
        return connected; 
    }

    @Override
    public boolean isActive() {
        return active; 
    }

    @Override
    public boolean isConfigured() {
        return configured; 
    }

    @Override
    public boolean isHealthy() {
        return healthy; 
    }

    @Override
    public boolean connect() {
        connected = true; 
        return true; 
    }

    @Override
    public boolean disconnect() {
        connected = false; 
        return true; 
    }
    
}
